-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored hook handlers in mongoose_metrics_mam_hooks #3829
Conversation
small_tests_24 / small_tests / 6125938 small_tests_25 / small_tests / 6125938 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 6125938 ldap_mnesia_24 / ldap_mnesia / 6125938 ldap_mnesia_25 / ldap_mnesia / 6125938 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 6125938 dynamic_domains_mysql_redis_25 / mysql_redis / 6125938 pgsql_mnesia_24 / pgsql_mnesia / 6125938 internal_mnesia_25 / internal_mnesia / 6125938 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 6125938 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 6125938 pgsql_mnesia_25 / pgsql_mnesia / 6125938 mysql_redis_25 / mysql_redis / 6125938 riak_mnesia_24 / riak_mnesia / 6125938 mssql_mnesia_25 / odbc_mssql_mnesia / 6125938 |
Codecov ReportBase: 82.99% // Head: 83.05% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3829 +/- ##
==========================================
+ Coverage 82.99% 83.05% +0.05%
==========================================
Files 528 528
Lines 33925 33957 +32
==========================================
+ Hits 28156 28202 +46
+ Misses 5769 5755 -14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
6125938
to
dcd5929
Compare
small_tests_24 / small_tests / dcd5929 small_tests_25 / small_tests / dcd5929 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / dcd5929 ldap_mnesia_24 / ldap_mnesia / dcd5929 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / dcd5929 ldap_mnesia_25 / ldap_mnesia / dcd5929 rest_client_SUITE:muc:room_msg_is_sent_and_delivered_over_sse{error,{{badmap,{error,timeout}},
[{erlang,map_get,
[data,{error,timeout}],
[{error_info,#{module => erl_erts_errors}}]},
{rest_client_SUITE,room_msg_is_sent_and_delivered_over_sse,1,
[{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
{line,264}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} dynamic_domains_mysql_redis_25 / mysql_redis / dcd5929 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / dcd5929 internal_mnesia_25 / internal_mnesia / dcd5929 pgsql_mnesia_24 / pgsql_mnesia / dcd5929 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / dcd5929 riak_mnesia_24 / riak_mnesia / dcd5929 graphql_server_SUITE:admin_http:clustering_http_tests:remove_dead_from_cluster_http{error,
{{badrpc,
{'EXIT',
{#{cluster_member => mongooseim@localhost,
reason => set_extra_db_nodes_failed,
result => {ok,[]}},
[{mongoose_cluster,set_extra_db_nodes,1,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,132}]},
{mongoose_cluster,unsafe_join,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,116}]},
{mongoose_cluster,with_app_stopped,2,
[{file,"/home/circleci/project/src/mongoose_cluster.erl"},
{line,221}]},
{global,trans,4,[{file,"global.erl"},{line,463}]},
{mongoose_cluster,join,1,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim3@localhost,timeout => 60000},
mongoose_cluster,join,
[mongooseim@localhost]],
[{file,
"/home/circleci/project/big_tests/tests/distributed_helper.erl"},
{line,121}]},
{graphql_server_SUITE,remove_dead_from_cluster_http,1,
[{file,
"/home/circleci/project/big_tests/tests/graphql_server_SUITE.erl"},
{line,247}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} mysql_redis_25 / mysql_redis / dcd5929 muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} pgsql_mnesia_25 / pgsql_mnesia / dcd5929 mssql_mnesia_25 / odbc_mssql_mnesia / dcd5929 ldap_mnesia_25 / ldap_mnesia / dcd5929 mysql_redis_25 / mysql_redis / dcd5929 riak_mnesia_24 / riak_mnesia / dcd5929 |
dcd5929
to
3bb18b8
Compare
small_tests_24 / small_tests / 3bb18b8 small_tests_25 / small_tests / 3bb18b8 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 3bb18b8 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 3bb18b8 dynamic_domains_mysql_redis_25 / mysql_redis / 3bb18b8 ldap_mnesia_25 / ldap_mnesia / 3bb18b8 ldap_mnesia_24 / ldap_mnesia / 3bb18b8 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 3bb18b8 internal_mnesia_25 / internal_mnesia / 3bb18b8 riak_mnesia_24 / riak_mnesia / 3bb18b8 pgsql_mnesia_24 / pgsql_mnesia / 3bb18b8 pgsql_mnesia_25 / pgsql_mnesia / 3bb18b8 bosh_SUITE:essential:accept_higher_hold_value{error,
{{assertEqual,
[{module,bosh_SUITE},
{line,251},
{expression,"get_bosh_sessions ( )"},
{expected,[]},
{value,
[{bosh_session,<<"e291b63eca7427787239a3bca105a247265f32f3">>,
<9158.6065.0>}]}]},
[{bosh_SUITE,accept_higher_hold_value,1,
[{file,"/home/circleci/project/big_tests/tests/bosh_SUITE.erl"},
{line,251}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 3bb18b8 mysql_redis_25 / mysql_redis / 3bb18b8 mssql_mnesia_25 / odbc_mssql_mnesia / 3bb18b8 muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2726@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2726@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"uDLS5Md4GBVNiSIagXWPaA==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor comment.
mam_get_prefs(Acc, _, #{host_type := Host}) -> | ||
mongoose_metrics:update(Host, modMamPrefsGets, 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might rename these variables to HostType
, it is what they actually are but were just not updated when we introduced host types 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👍
ba68cbb
to
41540df
Compare
small_tests_24 / small_tests / 41540df small_tests_25 / small_tests / 41540df dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 41540df dynamic_domains_mysql_redis_25 / mysql_redis / 41540df ldap_mnesia_24 / ldap_mnesia / 41540df ldap_mnesia_25 / ldap_mnesia / 41540df internal_mnesia_25 / internal_mnesia / 41540df dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 41540df dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 41540df pgsql_mnesia_24 / pgsql_mnesia / 41540df elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 41540df pgsql_mnesia_25 / pgsql_mnesia / 41540df mysql_redis_25 / mysql_redis / 41540df riak_mnesia_24 / riak_mnesia / 41540df mssql_mnesia_25 / odbc_mssql_mnesia / 41540df |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, to improve duplication.
41540df
to
4b6dc14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent 👌🏽
small_tests_24 / small_tests / 4b6dc14 small_tests_25 / small_tests / 4b6dc14 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 4b6dc14 ldap_mnesia_24 / ldap_mnesia / 4b6dc14 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 4b6dc14 dynamic_domains_mysql_redis_25 / mysql_redis / 4b6dc14 muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} ldap_mnesia_25 / ldap_mnesia / 4b6dc14 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 4b6dc14 internal_mnesia_25 / internal_mnesia / 4b6dc14 pgsql_mnesia_24 / pgsql_mnesia / 4b6dc14 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 4b6dc14 pgsql_mnesia_25 / pgsql_mnesia / 4b6dc14 riak_mnesia_24 / riak_mnesia / 4b6dc14 mysql_redis_25 / mysql_redis / 4b6dc14 mssql_mnesia_25 / odbc_mssql_mnesia / 4b6dc14 disco_and_caps_SUITE:disco_with_caps:user_cannot_query_friend_resources_with_unknown_node{error,{{assertion_failed,assert_many,false,[is_roster_set],[],[]},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{escalus_story,'-make_all_clients_friends/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,108}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
{escalus_utils,'-each_with_index/3-fun-0-',3,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,87}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
{escalus_utils,distinct_pairs,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
{line,60}]},
{escalus_story,make_all_clients_friends,1,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,106}]}]}} pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2590@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2590@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"maA92/8vAOrANh4nNT6oZA==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} dynamic_domains_mysql_redis_25 / mysql_redis / 4b6dc14 |
This PR changes all hook handlers in
mongoose_metrics_mam_hooks
module togen_hook
format.